/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Calculadora;

/**
 *
 * @author HP
 */
public class Resta extends OperacionBinaria {

  public Resta(Operacion op1, Operacion op2) {
      super(op1, op2);
  }

  public Number Restar() {
  return op1.Operar().doubleValue() - op2.Operar().doubleValue();
  }

  @Override
  public Number Operar() {
  return Restar();
  }
  
  @Override
  public String toString(){
      return op1.toString() + " - " + op2.toString() + " ";
  }

}
